package com.orhon.smartcampus.modules.baseinfo.mm;

import com.orhon.smartcampus.modules.baseinfo.entity.MessageCategory;
import com.orhon.smartcampus.modules.baseinfo.gqlModel.GQLMessageCategory;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper()
public interface MessageCategoryMapper {

    MessageCategoryMapper MAPPER = Mappers.getMapper(MessageCategoryMapper.class);

    @Mapping(source = "id" , target = "id")
    @Mapping(source = "categoryName" , target = "categoryName")
    @Mapping(source = "categoryValue" , target = "categoryValue")
    @Mapping(source = "createTime" , target = "createTime")
    @Mapping(source = "createUser" , target = "createUser")
    @Mapping(source = "categoryExplain", target = "categoryExplain")
    @Mapping(source = "deletedAt", target = "deletedAt")
    GQLMessageCategory toMessageCategory(MessageCategory entity);
    
    
    @InheritConfiguration(name = "toMessageCategory")
    List<GQLMessageCategory> toMessageCategoryList(List<MessageCategory> entities);



}
